<?php

/**
 * This is the model class for table "material".
 *
 * The followings are the available columns in table 'material':
 * @property integer $materialid
 * @property string $materialname
 * @property integer $storagequantity
 * @property integer $addquantity
 * @property double $addprice
 * @property integer $deliveredquantity
 * @property string $requestid
 * @property integer $unitid
 * @property integer $materiallimit
 */
class Material extends MaterialBase
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Material the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
	
	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
                    'unit' => array(self::BELONGS_TO, 'Unit', 'unitid'),
                    'supplier' => array(self::BELONGS_TO, 'Supplier', 'supplierid'),
		);
	}	
}